home *** CD-ROM | disk | FTP | other *** search
/ PC go! 2008 April / PCgo 2008-04 (DVD).iso / interface / contents / demoversionen_3846 / 13664 / files / Data1.cab / csharproundrect.cs < prev    next >
Encoding:
Text File  |  2004-07-15  |  18.3 KB  |  602 lines

  1. //******************************************************************'
  2. //*                                                                *'
  3. //*                      TurboCAD for Windows                      *'
  4. //*                   Copyright (c) 1993 - 2004                    *'
  5. //*             International Microcomputer Software, Inc.         *'
  6. //*                            (IMSI)                              *'
  7. //*                      All rights reserved.                      *'
  8. //*                                                                *'
  9. //******************************************************************'
  10. using System;
  11. using System.Reflection;
  12.  
  13. namespace CSharpRoundRect
  14. {
  15.     /// <summary>
  16.     /// Summary description for Class1.
  17.     /// </summary>
  18.     public class CSharpRoundRect
  19.     {
  20.         const int gkGraphic = 11;
  21.         const int gkArc = 2;
  22.         const int gkText = 6;
  23.         const int gfCosmetic = 128;
  24.  
  25.         //Useful math constants
  26.         const double PI = 3.1415926500000002;
  27.  
  28.         //'Real variant types!
  29.         const int typeEmpty = 0;
  30.         const int typeInteger = 2;
  31.         const int typeLong = 3;
  32.         const int typeSingle = 4;
  33.         const int typeDouble = 5;
  34.         const int typeCurrency = 6;
  35.         const int typeDate = 7;
  36.         const int typeString = 8;
  37.         const int typeObject = 9;
  38.         const int typeBoolean = 11;
  39.         const int typeVariant = 12;
  40.         const int typeIntegerEnum = typeInteger + 100;
  41.         const int typeLongEnum = typeLong + 100;
  42.         const int typeStringEnum = typeString + 100;
  43.  
  44.         //'Stock property pages
  45.         const int ppStockPen = 1;
  46.         const int ppStockBrush = 2;
  47.         const int ppStockText = 4;
  48.         const int ppStockInsert = 8;
  49.         const int ppStockViewport = 16;
  50.         const int ppStockAuto = 32;
  51.  
  52.         //'Property Ids
  53.         const int idRoundness = 1;
  54.         const int idBeginColor = 2;
  55.         const int idEndColor = 3;
  56.         const int idGradientMode = 4;
  57.  
  58.         //'Property enums
  59.  
  60.         //'Number of properties, pages, wizards
  61.         const int NUM_PROPERTIES = 1;
  62.         const int NUM_PAGES= 1;
  63.         const int NUM_WIZARDS = 0;
  64.         frmRRect m_RRectPropertyPage;
  65.  
  66.         public CSharpRoundRect()
  67.         {
  68.             m_RRectPropertyPage = new frmRRect();
  69.         }
  70.         public string Description
  71.             {
  72.                 get
  73.                 {
  74.                     return "SDK C# NET RoundRectangle (VB NET sample)";
  75.                 }
  76.             }
  77.         public int GetPropertyInfo(out object Names, out object Types, out object IDs, out object Defaults)
  78.         {
  79.                 
  80.             int retVal;
  81.             string[] strNames = new string[NUM_PROPERTIES];
  82.             int[] intTypes = new int[NUM_PROPERTIES];
  83.             int[] intIds = new int[NUM_PROPERTIES];
  84.             object[] dblDefaults = new object[NUM_PROPERTIES];
  85.  
  86.             strNames[0] = "Roundness";
  87.             intTypes[0] = typeDouble;
  88.             intIds[0] = idRoundness;
  89.             dblDefaults[0] = 50;
  90.             Names = strNames;
  91.             Types = intTypes;
  92.             IDs = intIds;
  93.             Defaults = dblDefaults;
  94.  
  95.             retVal = NUM_PROPERTIES;
  96.             return retVal;
  97.         }    
  98.         
  99.  
  100.         public int GetPageInfo(object AGraphic, out int StockPages,out object Names)
  101.         {
  102.                 
  103.             string[] strNames = new string[NUM_PAGES];
  104.             strNames[0] = m_RRectPropertyPage.Text;
  105.             StockPages = ppStockBrush + ppStockPen + ppStockAuto;
  106.             Names = strNames;
  107.             return NUM_PAGES;
  108.         }
  109.  
  110.  
  111.         public int GetWizardInfo(out object Names)
  112.         {
  113.             string[] strNames = new string[NUM_WIZARDS];
  114.             Names = strNames;
  115.             return NUM_WIZARDS;
  116.         }
  117.  
  118.         //Enumerate the names and values of a specified property
  119.         public int GetEnumNames(int PropID, object Names, object Values)
  120.         {
  121.             return 0;
  122.         }
  123.  
  124.  
  125.         public bool PageControls(object ThisRegenMethod, IMSIGX.Graphic  Graphic, int PageNumber, bool SaveProperties)
  126.         {
  127.             IMSIGX.Property gxProp;
  128.             double Roundness;
  129.             object varIndex;
  130.             object varValue;
  131.             try
  132.             {
  133.                 if (SaveProperties)
  134.                 {
  135.                     //'OK button on property page was clicked
  136.                     //Form is still loaded
  137.                     ///With m_RRectPropertyPage
  138.                     //Need On Error statement for the case where you have
  139.                     //RRect Turbo Shape and ahother "shape" selected
  140.                     //On Error Resume Next
  141.  
  142.                     //When the property page is closed, transfer the numeric
  143.                     //roundness value from the TextBox to the Graphic
  144.                     //Get the value as a double-precision number
  145.                     Roundness = System.Convert.ToDouble(m_RRectPropertyPage.tbRoundness.Text);
  146.                     /*
  147.                     mBeginColor = .cmColor1.BackColor
  148.                     mEndColor = .cmColor2.BackColor
  149.                     mGradientMode = .cModesCombo.SelectedIndex
  150.                     */
  151.                     //'Make sure it's between 0 and 100
  152.                     if (Roundness < 0.0) 
  153.                     {
  154.                         Roundness = 0.0;
  155.                     }
  156.                     if (Roundness > 100.0)
  157.                     {
  158.                         Roundness = 100.0;
  159.                     }
  160.                     //'Set the roundness property value in the Graphic
  161.                     varIndex = "Roundness";
  162.                     gxProp = Graphic.Properties.get_Item(ref varIndex);
  163.                     varValue = Roundness;
  164.                     gxProp.set_Value(0,ref varValue );
  165.                 }
  166.                 else
  167.                 {
  168.                     //'Property page is about to be opened
  169.                     //'Make sure the form is loaded
  170.                     //'If more than one RRect is selected and they do not
  171.                     //'have the same properties, don't set up this field
  172.                     //'When the property page is opening, transfer the numeric
  173.                     //'roundness value from the Graphic to the TextBox
  174.                     //'Get the roundness property value from the Graphic
  175.                     varIndex = "Roundness";
  176.                     gxProp = Graphic.Properties.get_Item(ref varIndex);
  177. //                    Roundness = (double)gxProp.get_Value(0);
  178.                     Roundness = System.Convert.ToDouble (gxProp.get_Value(0));
  179.                     //'Set the TextBox control's text
  180.                     m_RRectPropertyPage.tbRoundness.Text = System.Convert.ToString (Roundness);
  181.                 }
  182.                 return true;
  183.         }
  184.             catch
  185.             {
  186.                 return false;
  187.             }
  188.         }
  189.  
  190.         public void PageDone(object ThisRegenMethod, int PageNumber)
  191.         {
  192.         }
  193.         public bool PropertyPages(object ThisRegenMethod, int PageNumber)
  194.         {
  195.             bool bRet;
  196.             m_RRectPropertyPage.ShowDialog();
  197.             bRet = !m_RRectPropertyPage.bCanceled;
  198.             return bRet;
  199.         }
  200.         public bool Wizard(object ThisRegenMethod, int WizardNumber)
  201.         {
  202.             return false;
  203.         }
  204.         public void OnGeometryChanged(object Graphic, long GeomID, object paramOld, object paramNew)
  205.         {
  206.             //'Do nothing
  207.             //'Regen Graphic
  208.         }
  209.  
  210.         //'Called when vertex is moved, or other geometry change
  211.         public bool OnGeometryChanging(object Graphic, int GeomID, object paramOld, object paramNew)
  212.         {
  213.             //'OK to continue with change
  214.             return true;
  215.         }
  216.  
  217.         public bool OnNewGraphic(IMSIGX.Graphic grfThis, bool boolCopy)
  218.         {
  219.             if (boolCopy)
  220.             {
  221.                 //'Vertices are already added for us...
  222.                 return true;
  223.             }
  224.             object missing = Missing.Value;
  225.  
  226.             object varTrue;
  227.             object varFalse;
  228.             object varX;
  229.             object varY;
  230.             object varZ;
  231.             object varIndex;
  232.             object varValue;
  233.             varTrue = true;
  234.             varFalse = false;
  235.             try
  236.             {
  237.                 
  238.                 //            On Error GoTo Failed
  239.                 //          'New Graphic being created
  240.                 //        'X, Y, Z, PenDown, Selectable, Snappable, Editable, Linkable
  241.                 //        'First Vertex is "lower left" corner
  242.                 varX = -1.0;
  243.                 varY = -0.5;
  244.                 varZ = 0;
  245.                 grfThis.Vertices.Add (ref varX, ref varY, ref varZ, ref varFalse, ref varTrue, ref varFalse, ref varFalse, ref varFalse,ref varFalse,ref missing, ref missing) ;
  246.                 //'Second Vertex is "upper right" corner
  247.                 varX = 1.0;
  248.                 varY = 0.5;
  249.                 varZ = 0;
  250.                 grfThis.Vertices.Add (ref varX, ref varY, ref varZ, ref varFalse, ref varTrue, ref varFalse, ref varFalse, ref varFalse,ref varFalse,ref missing, ref missing) ;
  251.                 //'Third Vertex is rounding handle (calculated)
  252.                 double R,Roundness, Offset;
  253.                 IMSIGX.Property P;
  254.                 varIndex = "Roundness";
  255.                 P = grfThis.Properties.get_Item(ref varIndex);
  256. //                Roundness = (double)P.get_Value(0);
  257.                 Roundness = System.Convert.ToDouble (P.get_Value(0));
  258.  
  259.                 R = 0.5 * Roundness / 100.0;
  260.                 Offset = 0.10000000000000001 * R;
  261.                 varX = 1.0 - R;
  262.                 varY = 0.5 + Offset;
  263.                 varZ = 0;
  264.                 
  265.                 grfThis.Vertices.Add (ref varX, ref varY, ref varZ, ref varFalse, ref varFalse, ref varFalse, ref varFalse, ref varFalse,ref varFalse,ref missing, ref missing) ;
  266.                 //'Fourth Vertex is rounding handle (editable)
  267.                 grfThis.Vertices.Add (ref varX, ref varY, ref varZ, ref varFalse, ref varTrue, ref varFalse, ref varTrue, ref varFalse,ref varFalse,ref missing, ref missing) ;
  268.                 varIndex = "LimitVertices";
  269.                 P = grfThis.Properties.get_Item(ref varIndex);
  270.                 varValue = 4;
  271.                 P.set_Value(0, ref varValue);
  272.                 //OnNewGraphic = true
  273.                 return true;
  274.             }
  275.             catch(Exception e)
  276.             {
  277.                 
  278.                 //'Return false on failure
  279.                 Console.WriteLine("An error occurred: '{0}'", e);
  280.  
  281.                 return false;
  282.             }
  283.         }
  284.  
  285.  
  286.         //'Function called whenever a copy of a graphic is being made
  287.         public bool OnCopyGraphic(object grfCopy, object grfSource)
  288.         {
  289.             //'Return false on failure
  290.             return true;
  291.         }
  292.  
  293.         //'Notification function called after graphic property is saved
  294.         public void OnPropertyChanged(object Graphic,int PropID,    object ValueOld, object ValueNew)
  295.         {
  296.             //'Do nothing
  297.         }
  298.  
  299.         //'Notification function called when graphic property is saved
  300.         public bool OnPropertyChanging(object Graphic, int PropID, object ValueOld, object ValueNew)
  301.         {                                                                                                                             
  302.             //'OK to proceed
  303.             // OnPropertyChanging = True
  304.             return true;
  305.         }
  306.  
  307.         //'Notification function called when graphic property is retrieved
  308.         public void OnPropertyGet(object Graphic, int PropID)
  309.         {
  310.             //'Do nothing
  311.         }
  312.  
  313.  
  314.         public void Regen(IMSIGX.Graphic  grfThis)
  315.         {
  316.             //'Setup error handler
  317.             object missing = Missing.Value;
  318.             object varIndex;
  319.             object varValue;
  320.             object varX;
  321.             object varY;
  322.             object varZ;
  323.             object varTrue;
  324.             object varFalse;
  325.             object varType;
  326.             varTrue = true;
  327.             varFalse = false;
  328.  
  329.             IMSIGX.IVertex gxVrt, gxVrt1;
  330.             IMSIGX.Property P ;
  331.  
  332.             //         'Set up lock (prevent recursion)
  333.             try
  334.             {
  335.                 int LockCount;
  336.                 LockCount = grfThis.RegenLock();
  337.                 //'Setup error handler (make sure lock is removed)
  338.                 //On Error GoTo FailedLock
  339.                 if (LockCount == 0)
  340.                 {
  341.                     //'Delete any previous cosmetic children
  342.                     varValue = gfCosmetic;
  343.                     grfThis.Graphics.Clear(ref varValue);
  344.                     bool boolHandleMoved;
  345.                     //'Calculate height, width and radius of corners
  346.                     double W, H, R, Roundness;
  347.                     IMSIGX.Vertices pVerts;
  348.                     pVerts = grfThis.Vertices;
  349.  
  350.                     varIndex = 2;
  351.                     gxVrt = pVerts.get_Item(ref varIndex);
  352.                     varIndex = 3;
  353.                     gxVrt1 = pVerts.get_Item(ref varIndex);
  354.  
  355.                     
  356.                     if (Math.Abs(gxVrt.X - gxVrt1.X) < 0.00000099999999999999995 && Math.Abs(gxVrt.Y - gxVrt1.Y) < 0.00000099999999999999995)
  357.                     {
  358.                         boolHandleMoved = false;
  359.                     }
  360.                     else
  361.                     {
  362.                         boolHandleMoved = true;
  363.                     }
  364.                     varIndex = 1;
  365.                     gxVrt = pVerts.get_Item(ref varIndex);
  366.                     varIndex = 0;
  367.                     gxVrt1 = pVerts.get_Item(ref varIndex);
  368.  
  369.                     W = Math.Abs(gxVrt.X - gxVrt1.X);
  370.                     H = Math.Abs(gxVrt.Y - gxVrt1.Y);
  371.                     
  372.                     //'Radius of arcs is based on minimum of width and height
  373.                     if (W < H)
  374.                     {
  375.                         R = W / 2.0;
  376.                     }
  377.                     else
  378.                     {
  379.                         R = H / 2.0;
  380.                     }
  381.                     //        'Adjust radius for roundness
  382.                     if (boolHandleMoved)
  383.                     {
  384.                         varIndex = 2;
  385.                         gxVrt = pVerts.get_Item(ref varIndex);
  386.                         varIndex = 3;
  387.                         gxVrt1 = pVerts.get_Item(ref varIndex);
  388.  
  389.                         Roundness = Math.Abs(gxVrt.X - gxVrt1.X);
  390.                         Roundness = Roundness * 100.0 / R;
  391.                         if (Roundness > 100.0)
  392.                         {
  393.                             Roundness = 100.0;
  394.                         }
  395.                         //'Relocate handle
  396.  
  397.                         //'Update property to reflect handle location
  398.                         varIndex = "Roundness";
  399.                         P = grfThis.Properties.get_Item(ref varIndex);
  400.                         varValue = Roundness;
  401.                         P.set_Value(0, ref varValue);
  402.                     }
  403.                     else
  404.                     {
  405.                         varIndex = "Roundness";
  406.                         P = grfThis.Properties.get_Item(ref varIndex);
  407.  
  408. //                        Roundness = (double)P.get_Value(0);
  409.                         Roundness = System.Convert.ToDouble (P.get_Value(0));
  410.                         if (Roundness < 0.0)
  411.                         {
  412.                             Roundness = 0.0;
  413.                         }
  414.                         if (Roundness > 100.0)
  415.                         {
  416.                             Roundness = 100.0;
  417.                         }
  418.                     }
  419.                     R = R * Roundness / 100.0;
  420.                     //'Add child Graphics
  421.                     IMSIGX.IGraphic  grfChild;
  422.                     double X0, Y0, X1, Y1, T;
  423.                     varIndex = 0;
  424.                     gxVrt = pVerts.get_Item(ref varIndex);
  425.                     varIndex = 1;
  426.                     gxVrt1 = pVerts.get_Item(ref varIndex);
  427.                     X0 = gxVrt.X;
  428.                     Y0 = gxVrt.Y;
  429.                     X1 = gxVrt1.X;
  430.                     Y1 = gxVrt1.Y;
  431.                     //'Make sure X0 < X1
  432.                     if (X0 > X1)
  433.                     {
  434.                         T = X0;
  435.                         X0 = X1;
  436.                         X1 = T;
  437.                     }
  438.                     //'Make sure Y0 < Y1
  439.                     if (Y0 > Y1)
  440.                     {
  441.                         T = Y0;
  442.                         Y0 = Y1;
  443.                         Y1 = T;
  444.                     }
  445.                     //End With
  446.  
  447.                     if (R == 0.0)
  448.                     {
  449.                         //'No rounded corners
  450.                         //'All children are cosmetic
  451.                         varValue = gkGraphic;
  452.                         grfChild = grfThis.Graphics.Add(ref varValue, ref missing, ref missing,ref missing,ref missing, ref missing);
  453.                         grfChild.Cosmetic = true;
  454.                         //'Now add vertices to the child
  455.                         varX = X0;
  456.                         varY = Y0;
  457.                         varZ = 0;
  458.                         grfChild.Vertices.Add(ref varX, ref varY, ref varZ, ref missing, ref missing,ref missing,ref missing,ref missing,ref missing,ref missing,ref missing);
  459.                         varY = Y1;
  460.                         grfChild.Vertices.Add(ref varX, ref varY, ref varZ, ref varTrue, ref missing,ref missing,ref missing,ref missing,ref missing,ref missing,ref missing);
  461.                         varX = X1;
  462.                         grfChild.Vertices.Add(ref varX, ref varY, ref varZ, ref varTrue, ref missing,ref missing,ref missing,ref missing,ref missing,ref missing,ref missing);
  463.                         varY = Y0;
  464.                         grfChild.Vertices.Add(ref varX, ref varY, ref varZ, ref varTrue, ref missing,ref missing,ref missing,ref missing,ref missing,ref missing,ref missing);
  465.                         
  466.                         //'Close the rectangle
  467.                         //                            .AddClose(PenDown:=true) //'PenDown
  468.                         grfChild.Vertices.AddClose(ref varTrue, ref missing,ref missing,ref missing,ref missing,ref missing); //'PenDown
  469.                         //End With
  470.                     }
  471.                     else
  472.                     {
  473.                         //'Rounded corners
  474.                         //'We'll make 4 line children and 4 arc children
  475.                         // 'First line
  476.                         //'All children are cosmetic
  477.                         varValue = gkGraphic;
  478.                         grfChild = grfThis.Graphics.Add(ref varValue,ref missing,ref missing,ref missing,ref missing,ref missing);
  479.                         grfChild.Cosmetic = true;
  480.                         //'Now add vertices to the child
  481.                         varX = X0 + R;
  482.                         varY = Y0;
  483.                         varZ = 0;
  484.                         grfChild.Vertices.Add(ref varX, ref varY, ref varZ, ref missing, ref missing,ref missing,ref missing,ref missing,ref missing,ref missing,ref missing);
  485.                         varX = X1 - R;
  486.                         varY = Y0;
  487.                         varZ = 0;
  488.                         grfChild.Vertices.Add(ref varX, ref varY, ref varZ, ref varTrue, ref missing,ref missing,ref missing,ref missing,ref missing,ref missing,ref missing);
  489.                         //'First arc
  490.                         varValue = gkArc;
  491.                         grfChild = grfThis.Graphics.Add(ref varValue, ref missing,ref missing,ref missing,ref missing,ref missing);
  492.                         grfChild.Cosmetic = true;
  493.  
  494.                         varX = X1 - R;
  495.                         varY = Y0 + R;
  496.                         varZ = 0;
  497.                         object varR;
  498.                         object varRot;
  499.                         varRot = 0;
  500.                         varR = R;
  501.                         varValue = 1.5 * PI;
  502.                         grfChild.ArcSet(ref varX, ref varY, ref varZ, ref varR, ref missing, ref varValue, ref varRot, ref missing);
  503.                         //'Second line
  504.                         varValue = gkGraphic;
  505.                         grfChild = grfThis.Graphics.Add(ref varValue, ref missing,ref missing,ref missing,ref missing,ref missing);
  506.                         grfChild.Cosmetic = true;
  507.                         //With grfChild.Vertices
  508.                         varX = X1;
  509.                         varY = Y0 + R;
  510.                         varZ = 0;
  511.                         grfChild.Vertices.Add(ref varX, ref varY, ref varZ, ref missing, ref missing,ref missing,ref missing,ref missing,ref missing,ref missing,ref missing);
  512.                         varX = X1;
  513.                         varY = Y1 - R;
  514.                         varZ = 0;
  515.                         grfChild.Vertices.Add(ref varX, ref varY, ref varZ, ref varTrue, ref missing,ref missing,ref missing,ref missing,ref missing,ref missing,ref missing);
  516.                         //'Second arc
  517.                         varValue = gkArc;
  518.                         grfChild = grfThis.Graphics.Add(ref varValue,ref missing,ref missing,ref missing,ref missing,ref missing);
  519.                         grfChild.Cosmetic = true;
  520.                         varX = X1 - R;
  521.                         varY = Y1 - R;
  522.                         varZ = 0;
  523.                         varRot = 0;
  524.                         varR = R;
  525.                         varValue = 0.5 * PI;
  526.                         grfChild.ArcSet(ref varX, ref varY, ref varZ, ref varR, ref missing, ref varRot, ref varValue, ref missing);
  527.                         //'Third line
  528.                         varValue = gkGraphic;
  529.                         grfChild = grfThis.Graphics.Add(ref varValue, ref missing, ref missing, ref missing,ref missing,ref missing);
  530.                         grfChild.Cosmetic = true;
  531.                         varX = X1 - R;
  532.                         varY = Y1;
  533.                         varZ = 0;
  534.                         grfChild.Vertices.Add(ref varX, ref varY, ref varZ, ref missing, ref missing,ref missing,ref missing,ref missing,ref missing,ref missing,ref missing);
  535.                         varX = X0 + R;
  536.                         varY = Y1;
  537.                         varZ = 0;
  538.                         grfChild.Vertices.Add(ref varX, ref varY, ref varZ, ref varTrue, ref missing,ref missing,ref missing,ref missing,ref missing,ref missing,ref missing);
  539.                         //'Third arc
  540.                         varValue = gkArc;
  541.                         grfChild = grfThis.Graphics.Add(ref varValue,ref missing, ref missing,ref missing,ref missing,ref missing);
  542.                         grfChild.Cosmetic = true;
  543.                         
  544.                         varX = X0 + R;
  545.                         varY = Y1 - R;
  546.                         varZ = 0;
  547.                         varRot = 0;
  548.                         varR = R;
  549.                         varValue = 0.5 * PI;
  550.                         object varPI;
  551.                         varPI = PI;
  552.                         grfChild.ArcSet(ref varX, ref varY, ref varZ, ref varR, ref missing,  ref varValue, ref varPI, ref missing);
  553.                         //'Fourth line
  554.                         varType = gkGraphic;
  555.                         grfChild = grfThis.Graphics.Add(ref varType, ref missing, ref missing,ref missing,ref missing,ref missing);
  556.                         grfChild.Cosmetic = true;
  557.                         varX = X0;
  558.                         varY = Y1 - R;
  559.                         varZ = 0;
  560.                         grfChild.Vertices.Add(ref varX, ref varY, ref varZ, ref missing, ref missing,ref missing,ref missing,ref missing,ref missing,ref missing,ref missing);
  561.                         varX = X0;
  562.                         varY = Y0 + R;
  563.                         varZ = 0;
  564.                         grfChild.Vertices.Add(ref varX, ref varY, ref varZ, ref varTrue, ref missing,ref missing,ref missing,ref missing,ref missing,ref missing,ref missing);
  565.                         //'Fourth arc
  566.                         varType = gkArc;
  567.                         grfChild = grfThis.Graphics.Add(ref varType, ref missing, ref missing,ref missing, ref missing,ref missing);
  568.                         grfChild.Cosmetic = true;
  569.                         
  570.                         varX = X0 + R;
  571.                         varY = Y0 + R;
  572.                         varZ = 0;
  573.                         varRot = 0;
  574.                         varR = R;
  575.                         varValue = 1.5 * PI;
  576.                         varPI = PI;
  577.                         grfChild.ArcSet(ref varX, ref varY, ref varZ, ref varR, ref missing, ref varPI, ref varValue, ref missing);
  578.                     }
  579.  
  580.                     //'Add visible child Graphics
  581.                 }
  582.  
  583.                 grfThis.RegenUnlock(ref missing);
  584.             }
  585.  
  586.             catch
  587.             {
  588.                 grfThis.RegenUnlock(ref missing);
  589.             }
  590.         }
  591.  
  592.     
  593.         public bool Draw(object grfThis, object view, object mat)
  594.         {
  595.             return false;
  596.         }
  597.  
  598.     }
  599.  
  600. }
  601.  
  602.